package com.aliyun.heiyu.powermaster.server.manager;


import com.aliyun.heiyu.powermaster.server.dao.entity.DeviceCommonEntity;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface DeviceManager {

    public boolean insert(Map<String, String> map) throws SQLException;

    public boolean update(Map<String, String> map) throws SQLException;

    public boolean delete(String[] deviceIds) throws SQLException;

    public boolean insertAll(List<Map<String, String>> map) throws SQLException;

    public List<DeviceCommonEntity> getDeviceCommonByCondition(String cabinetSn, String condition, String type, String business, String usageStatus, String locationId);

    public int getTotalCount(String cabinetSn, String condition, String type, String business, String usageStatus, String locationId);

    public List<DeviceCommonEntity> getDeviceCommonByCondition(String cabinetSn, String condition, String type, String business, String usageStatus, int pageNum, int pageSize,int totalCount,String locationId);

    public List<DeviceCommonEntity> findAllDeviceCommon();

    public List<DeviceCommonEntity> findByType(String type);

    public Map<String, String> findOneDeviceDetail(String deviceId);

    List<Map<String,String>> findDeviceSnByType(String types);

    public DeviceCommonEntity findOneDeviceCommon(String deviceId);

    public List<DeviceCommonEntity> findByLabel(String label);

    public String[] findDeviceIdArrayByLabel(String label);

    public int getCountOfCabinet(String deviceId);

    public List<DeviceCommonEntity> findByCabinet(String cabinet);

    public boolean checkDiviceExit(String deviceId);

    public boolean checkDiviceIpExit(String ip);

    public boolean checkLocatedIdExit(String locatedId);

    public boolean checkDeleteParams(String[] deviceIds);

    public Map<String, Map<String, String>> getDeviceDetailByCondition(String cabinetSn, String condition, String type, String business, String usageStatus, String locationId);

    public boolean modifyUsageStatus(String deviceId, String usageStatus);

    Map<String,Map<String,String>> findAllDeviceDetailMap();

    int usedServerAmount();

    int totalServerAmount();
}
